execute @a ~ ~ ~ scoreboard players operation @s RAM0 = @s 编号
scoreboard players operation @a RAM0 -= @s 编号
scoreboard players tag @a[score_RAM0_min=0,score_RAM0=0] add 完成开箱玩家
tellraw @a[tag=完成开箱玩家] "你成功的打开了一个箱子"
scoreboard players reset @a RAM0
scoreboard players add @a[tag=完成开箱玩家,team=!大厅] 开箱排行 1
scoreboard players tag @a remove 完成开箱玩家




scoreboard players set @s 随机数MAX 100
function main:取随机数
#正常情况如下
scoreboard players tag @s[score_随机数_min=98] add 怪物箱子
#下侧仅作为测试
#scoreboard players tag @s add 怪物箱子

scoreboard players reset @s 随机数
################################################################################

function chestNEW:怪物大礼包 if @s[tag=怪物箱子]
function chestNEW:ChestRandom unless @s[tag=怪物箱子]
scoreboard players tag @a[tag=完成开箱玩家] remove 完成开箱玩家